package server

import (
	"demo/api/user"

	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/net/ghttp"
)

func NewGf(iu user.IUserV1) *ghttp.Server {
	r := g.Server()
	r.Group("/", func(group *ghttp.RouterGroup) {
		group.Bind(iu)
	})

	r.BindHandler("/", func(r *ghttp.Request) {
        r.Response.WriteTpl("index.html")
    })

	

	return r
}
